<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>My JSP 'login.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	overflow: hidden;
}

.STYLE1 {
	font-size: 12px
}
-->
</style>
<script type="text/javascript">
	document.onkeydown = function() {
		if (event.keyCode == 13) {
			formSubmit();
		}
	};
	function formSubmit() {
		var uname = document.getElementById("uname").value;
		if (uname == null || uname == "") {
			alert("用户名不能为空");
			return;
		}
		var upwd = document.getElementById("upwd").value;
		if (upwd == null || upwd == "") {
			alert("密码不能为空");
			return;
		}
		document.adminlogin_form.submit();
	}

	function getfocus() {
		document.getElementById("uname").focus();
	}
</script>
</head>

<body onload="getfocus();">
	<s:if test="#session.login=='error'">用户名或密码错误</s:if>
	<s:form action="adminlogin" name="adminlogin_form" method="post">
		<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td bgcolor="9fc967">&nbsp;</td>
			</tr>
			<tr>
				<td height="604"><table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td height="604" background="<s:url value="admin/images/login_02.gif"/>">&nbsp;</td>
							<td width="989"><table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td height="345" background="images/login_1.jpg">&nbsp;</td>
									</tr>
									<tr>
										<td height="47"><table width="100%" border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td width="539" height="47" background="<s:url value="admin/images/login_05.gif"/>" nowrap="nowrap">&nbsp;</td>
													<td width="206" background="<s:url value="admin/images/login_06.gif"/>" nowrap="nowrap"><table width="100%" border="0" cellspacing="0" cellpadding="0">
															<tr>
																<td width="17%" height="22"><div align="center">
																		<span class="STYLE1">用户</span>
																	</div></td>
																<td width="58%" height="22"><div align="center">
																		<input name="uname" id="uname" type="text" size="15" style="height:17px; border:solid 1px #bbbbbb">
																	</div></td>
																<td width="25%" height="22">&nbsp;</td>
															</tr>
															<tr>
																<td height="22"><div align="center">
																		<span class="STYLE1">密码</span>
																	</div></td>
																<td height="22"><div align="center">
																		<input name="upwd" id="upwd" type="password" size="15" style="height:17px; border:solid 1px #bbbbbb">
																	</div></td>
																<td height="22"><div align="center">
																		<img src="<s:url value="admin/images/dl.gif"/>" width="39" height="18" onclick="formSubmit();">
																	</div></td>
															</tr>
														</table></td>
													<td width="244" background="<s:url value="admin/images/login_07.gif"/>" nowrap="nowrap">&nbsp;</td>
												</tr>
											</table></td>
									</tr>
									<tr>
										<td height="212" background="images/login_08.gif">&nbsp;</td>
									</tr>
								</table></td>
							<td background="images/login_04.gif">&nbsp;</td>
						</tr>
					</table></td>
			</tr>
			<tr>
				<td bgcolor="70ad21">&nbsp;</td>
			</tr>
		</table>
	</s:form>
</body>
</html>
